home *** CD-ROM | disk | FTP | other *** search
/ MacAdvocate 2 / apple-mac-advocate-ii-fall-1997.iso / mac / MacOS / Other Installers / LaserWriter 8.4.1 Installer / LaserWriter Disk 1 / PL.CommonRsrc / PL.CommonRsrc.rsrc / TEXT_1003.txt < prev    next >
Encoding:
Text File  |  1996-09-10  |  20.8 KB  |  568 lines

  1. %! Return a list of all fonts on the target printer,
  2. %% both in memory and on disk. Also return type and location.
  3. %% DAW 3/2/94,  Tim Mac 2/26/95,  Kras 11/17/94
  4.  
  5. /Zstr { 0 1 =string length 1 sub { =string exch 0 put } for } def    % Clean up the scratch string.
  6.  
  7. /ListFonts    % returns to host for each font: font name (Str255), font type (byte), location (byte) 
  8.             % type: 0=composite,1=adobe,2=truetype,3=other
  9.             % location: 0-7=distinguishable disk,8=non-distinguishable disk,
  10.             % 9=RAM, 10=ROM, 11=unknown (memory)
  11. {
  12.     6 dict begin /s 1 string def            % make a 1-byte string for returning single bytes
  13.     FontD                             % first, let's do the fonts in memory
  14.     {
  15.         excludeDotNames{                    % Exclude dot names if it's a Japanese printer
  16.             1 index Zstr =string cvs         % Convert the literal name into a string thing
  17.             (.) search{                        % looking for the dot
  18.                 5{pop}repeat false            % found it, so skip this one
  19.             }{pop true}ifelse                % didn't find it, so do this one
  20.         }{true}ifelse                        % not a Japanese printer, so do all fonts
  21.         {
  22.             exch dup /n exch def                % switch the name and the font dict around on the stack
  23.             Zstr =string cvs dup length         % determine name length
  24.             s exch 0 exch put s print print        % return length byte and name (it's a Str255!)
  25.             dup /fd exch def/FontType get         % get the font type outta the font dict
  26.             dup dup 1 eq exch 5 eq or            % is it type 1 or type 5?
  27.             {pop s 0 1 put}                        % then call 'em both a type 1
  28.             {dup 42 eq                             % else, is it type 42 (truetype)?
  29.             {pop s 0 2 put}                        % then call it a type 2
  30.             {dup 0 eq                            % else, is it a type 0 (composite)?
  31.             {pop s 0 0 put}                        % then call it a type 0
  32.             {4 eq                                % else, is it a type 4 (was loaded from disk)
  33.             {s 0 1 put}                            % then call it a type 1
  34.             {s 0 3 put}                            % else, call it a type 3 (other)
  35.             ifelse}ifelse}ifelse}ifelse            % catch up on ifelses
  36.             s print                                % return type byte
  37.             fd /inRAM known                        % if it's in RAM
  38.             {s 0 9 put}                            % return 9=RAM
  39.             { AppleLW                                    % else, is it an Apple printer?     
  40.              {n IsKnownROMFont {s 0 10 put}        % yes, it is, so call mr. special, is it ROM?
  41.              {s 0 9 put}ifelse                    % no, it must be RAM
  42.              }{ fd /CharStrings 2 copy known    % not an Apple printer, look at CharStrings 
  43.                 {get dup type/dicttype eq        % is it a dictionary?
  44.                 {{type/stringtype eq exch pop     % yes, ok, does it have strings in it
  45.                 exit}forall
  46.                 {s 0 9 put}{s 0 10 put}ifelse    % yes=RAM, no=ROM
  47.                 }{pop s 0 11 put}ifelse            % if CharStrings is not a dict, i give up
  48.                 }{pop pop s 0 11 put}ifelse        % if there is no dict, i give up
  49.                 }ifelse}ifelse s print            % output our final conclusion
  50.         }if
  51.     }forall
  52.     systemdict /filenameforall known
  53.       {                                            % ok, now let's get frisky with the disky
  54.         version cvi 47 le                        % if we can't distinguish disks...
  55.         {
  56.             (fonts/*)                            % for all files in the fonts directory...
  57.             {dup dup length 6 sub 6 exch        % strip off 6 bytes for "fonts/"
  58.             getinterval                            % from file name, leaving only font name
  59.             dup length s exch 0 exch put         % determine length
  60.             s print print                        % return length byte and name (Str255)
  61.             (r) file                             % now open font file for reading
  62.             /ss save def
  63.             dup                                 % dup the font file
  64.             {dup token                            % start loop, copy file obj, did we get a token?
  65.             {/FontType eq                        % yes we did, is the token "FontType" ?
  66.             { token pop exit}if                    % yes it is, so get next token and exit loop
  67.             }{pop 3 exit}ifelse                    % no more tokens, so push 3 and exit loop
  68.             }loop                                 % end of loop
  69.             ss restore                            % restore the memory. If not, will run out of memory if there are lot of disk fonts
  70.             dup 1 eq{s exch 0 exch put s print}    % if it's type 1, return a 1
  71.             {dup /type42known eq                 % else, if it's a boolean called "type42known"
  72.             1 index 42 eq or                    % or the number 42
  73.             {pop s 0 2 put s print}                % then return a 2
  74.             {dup 0 eq{pop s 0 0 put s print}    % else, if it's a 0, return 0
  75.             {dup 3 eq{pop s 0 3 put s print}    % else, if it's a 3, return 3
  76.             {dup 4 eq{pop s 0 1 put s print}    % else, if it's a 4, return 1
  77.             {pop s 0 3 put s print}ifelse        % else, return 3, for unknown
  78.             }ifelse}ifelse}ifelse}ifelse
  79.             closefile 
  80.     
  81.             s 0 8 put s print                    % return location = 8 for non-distinguishable disk
  82.             } 90 string filenameforall
  83.         }{                                            % else, if we can distinguish disks...
  84.             /n (%disk_%fonts/*) def                    % define the name prefix with placeholder for id
  85.             0 1 7{/d exch def                        % loop thru scsi id's 0 - 7
  86.                 n 5 d s cvs putinterval                % put the id in the placeholder
  87.                 n{
  88.                     excludeDotNames{                    % Exclude dot names if it's a Japanese printer
  89.                         dup (.) search{                    % looking for the dot
  90.                             4{pop}repeat false            % found it, so skip this one
  91.                         }{dup length 23 eq 
  92.                            {13 10 getinterval (NotDefFont) ne}  % don't display NotDefFont
  93.                            {pop true} ifelse
  94.                          }ifelse                        % didn't find it, so do this one
  95.                     }{true}ifelse                        % not a Japanese printer, so do all fonts
  96.                     {
  97.                         dup dup length                         % get length, save copy of complete name
  98.                         13 sub 13 exch getinterval            % strip off the name prefix
  99.                         dup dup cvn /tfn exch def
  100.                         length s exch 0 exch put             % determine length
  101.                         s print print                        % return length byte and name (Str255)
  102.                         (r) file                              % now open font file for reading
  103.                         /ss save def                         % save for restore later on
  104.                         dup                                    % dup the font file
  105.                         {dup {token}                         % start loop, copy file obj, did we get a token?
  106.                         stopped {1 true} if                      % Prevend from getting error when reading a binary file
  107.                         {/FontType eq                        % yes we did, is the token "FontType" ?
  108.                         { token pop exit}if                    % yes it is, so get next token and exit loop
  109.                         }{pop {tfn findfont /FontType get } stopped 
  110.                             {pop 3 } if exit}ifelse            % no FontType token then get FontType by findfont
  111.                                                             % Some fonts dont have FontType token because it copies other fonts 
  112.                         }loop                                 % if invalidfont (bad font) still display so that users can delete it
  113.                         ss restore                             % if don't restore will run out of memory of lot of disk fonts
  114.                         % end of loop
  115.                         dup 1 eq{s exch 0 exch put s print}    % if it's type 1, return a 1
  116.                         {dup /type42known eq                 % else, if it's a boolean called "type42known"
  117.                         1 index 42 eq or                    % or the number 42
  118.                         {pop s 0 2 put s print}                % then return a 2
  119.                         {dup 0 eq{pop s 0 0 put s print}    % else, if it's a 0, return 0
  120.                         {dup 3 eq{pop s 0 3 put s print}    % else, if it's a 3, return 3
  121.                         {dup 4 eq{pop s 0 1 put s print}    % else, if it's a 4, return 1
  122.                         {pop s 0 3 put s print}ifelse        % else, return 3, for unknown
  123.                         }ifelse}ifelse}ifelse}ifelse
  124.                         closefile 
  125.                         s 0 d put s print                    % return location = d for disk id
  126.                     }if
  127.                 } 90 string filenameforall
  128.             }for
  129.         }ifelse end
  130.     } if
  131. }def
  132.  
  133. /excludeDotNames statusdict begin product end
  134. dup (LaserWriter II NTX) eq statusdict begin version end (50.5) eq and
  135. 1 index (LaserWriter Select 610) eq or 1 index (LaserWriter 16/600 PS-J) 
  136. eq or 1 index (Color LaserWriter 12/600 PS-J) 
  137. eq or exch dup (PC-PR3000PS/4) eq exch (PC-PR3000PS/4F) eq or or def 
  138.  
  139. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  140. /AppleLW
  141.   statusdict begin product end                         % Get the product name string
  142.   (LaserWriter) search                                % Does it contain this famous name?
  143.     { pop pop pop true }
  144.     { false exch                                    % Check for LW Pro 400/405, project names, etc‚Ķ
  145.       [
  146.         (PC-PR3000PS/4) 
  147.         (PC-PR3000PS/4F) 
  148.                         ] 
  149.       { 1 index eq 3 -1 roll or exch } forall pop
  150.         { true } 
  151.         { false } ifelse } ifelse
  152. def
  153. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  154. /myProduct statusdict begin product 
  155.         Zstr =string cvs dup length 1 sub 0 exch 1 exch 
  156.         {
  157.             1 index exch 2 copy get dup 32 eq exch (/) 0 get eq or
  158.             {(_)0 get put}{pop pop}ifelse
  159.         }for
  160.         length dup =string exch (_) putinterval
  161.         1 add =string exch version end dup length
  162.         2 index add 4 1 roll putinterval
  163.         dup =string exch 0 exch getinterval
  164.         exch string dup 0 4 -1 roll putinterval def 
  165. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  166. % To exclude these RAM fonts for the NEX, Griffin-J and LW Pro 400/405
  167. statusdict begin product end dup dup
  168. (LaserWriter Select 610) eq exch (LaserWriter 16/600 PS-J) eq or exch (Color LaserWriter 12/600 PS-J) eq or
  169. { FontDirectory dup length dup
  170.   35 gt {1 add dict /FontD exch def
  171.     {
  172.     1 index dup (NotDefFont) eq  
  173.     [(ChuGothicBBB-Medium) 
  174.     (ChuGothicBBB-Medium-Mono)
  175.     (GothicBBB-Medium-83pv-RKSJ-H) 
  176.     (GothicBBB-Medium-83pv-SuppA-H)
  177.     (GothicBBB-Medium-83pv-SuppB-H)
  178.     (GothicBBB-Medium-RKSJ-UserGaiji) 
  179.     (HeiseiKakuGothic-W5)
  180.     (HeiseiMincho-W3)
  181.     (HonMincho-M)
  182.     (MaruGothic-M) 
  183.     (Osaka)
  184.     (Osaka-Mono)
  185.     (PCHelvetica)
  186.     (PCTimes-Roman)
  187.     (Ryumin-Light-83pv-RKSJ-H)
  188.     (Ryumin-Light-83pv-SuppA-H)
  189.     (Ryumin-Light-83pv-SuppB-H)
  190.     (Ryumin-Light-KL)
  191.     (Ryumin-Light-KL-Mono)
  192.     (Ryumin-Light-RKSJ-UserGaiji)] {2 index eq or} forall
  193.     {pop pop pop} {pop FontD 3 1 roll put}ifelse
  194.     } forall    
  195.   } { pop /FontDirectory exch def } ifelse  
  196. }
  197. { statusdict begin product end dup (PC-PR3000PS/4) eq exch (PC-PR3000PS/4F) eq or
  198.   { /FontD 1 dict def  /disk? false def
  199.     (*)
  200.     {dup (NotDefFont) eq 
  201.      {pop} 
  202.      {dup (GothicBBB-Medium-83pv-RKSJ-H) eq
  203.       [ (GothicBBB-Medium-83pv-SuppA-H) 
  204.         (GothicBBB-Medium-83pv-SuppB-H) 
  205.         (GothicBBB-Medium-Add-H) 
  206.         (GothicBBB-Medium-Add-RKSJ-H) 
  207.         (GothicBBB-Medium-Add-RKSJ-V) 
  208.         (GothicBBB-Medium-Add-SuppA-H) 
  209.         (GothicBBB-Medium-Add-SuppA-V) 
  210.         (GothicBBB-Medium-Add-SuppB-HV) 
  211.         (GothicBBB-Medium-Add-V) 
  212.         (GothicBBB-Medium-EUC-H) 
  213.         (GothicBBB-Medium-EUC-V) 
  214.         (GothicBBB-Medium-Ext-H) 
  215.         (GothicBBB-Medium-Ext-RKSJ-H) 
  216.         (GothicBBB-Medium-Ext-RKSJ-V) 
  217.         (GothicBBB-Medium-Ext-SuppA-H) 
  218.         (GothicBBB-Medium-Ext-SuppA-V) 
  219.         (GothicBBB-Medium-Ext-SuppB-HV) 
  220.         (GothicBBB-Medium-Ext-V) 
  221.         (GothicBBB-Medium-H) 
  222.         (GothicBBB-Medium-NWP-H) 
  223.         (GothicBBB-Medium-NWP-V) 
  224.         (GothicBBB-Medium-RKSJ-H) 
  225.         (GothicBBB-Medium-RKSJ-UserGaiji) 
  226.         (GothicBBB-Medium-RKSJ-V) 
  227.         (GothicBBB-Medium-SuppA-H) 
  228.         (GothicBBB-Medium-SuppA-V) 
  229.         (GothicBBB-Medium-SuppB-HV) 
  230.         (GothicBBB-Medium-V) 
  231.         (Mincho-PC-Hiragana) 
  232.         (Mincho-PC-Katakana) 
  233.         (PCHelvetica)
  234.         (PCTimes-Roman)
  235.         (Ryumin-Light-83pv-RKSJ-H) 
  236.         (Ryumin-Light-83pv-SuppA-H) 
  237.         (Ryumin-Light-83pv-SuppB-H) 
  238.         (Ryumin-Light-Add-H) 
  239.         (Ryumin-Light-Add-RKSJ-H) 
  240.         (Ryumin-Light-Add-RKSJ-V) 
  241.         (Ryumin-Light-Add-SuppA-H) 
  242.         (Ryumin-Light-Add-SuppA-V) 
  243.         (Ryumin-Light-Add-SuppB-HV) 
  244.         (Ryumin-Light-Add-V) 
  245.         (Ryumin-Light-EUC-H) 
  246.         (Ryumin-Light-EUC-V) 
  247.         (Ryumin-Light-Ext-H) 
  248.         (Ryumin-Light-Ext-RKSJ-H) 
  249.         (Ryumin-Light-Ext-RKSJ-V) 
  250.         (Ryumin-Light-Ext-SuppA-H) 
  251.         (Ryumin-Light-Ext-SuppA-V) 
  252.         (Ryumin-Light-Ext-SuppB-HV) 
  253.         (Ryumin-Light-Ext-V) 
  254.         (Ryumin-Light-H) 
  255.         (Ryumin-Light-NWP-H) 
  256.         (Ryumin-Light-NWP-V) 
  257.         (Ryumin-Light-RKSJ-H) 
  258.         (Ryumin-Light-RKSJ-UserGaiji) 
  259.         (Ryumin-Light-RKSJ-V) 
  260.         (Ryumin-Light-SuppA-H) 
  261.         (Ryumin-Light-SuppA-V) 
  262.         (Ryumin-Light-SuppB-HV) 
  263.         (Ryumin-Light-V)  ]
  264.      { 2 index eq or } forall 
  265.       { dup (FutoMinA101-Bold-83pv-RKSJ-H) eq
  266.         [ (FutoMinA101-Bold-83pv-RKSJ-H)
  267.           (FutoMinA101-Bold-83pv-SuppA-H)
  268.           (FutoMinA101-Bold-83pv-SuppB-H)
  269.           (FutoMinA101-Bold-Add-RKSJ-V)
  270.           (FutoMinA101-Bold-Add-RKSJ-H)
  271.           (FutoMinA101-Bold-Add-SuppA-V)
  272.           (FutoMinA101-Bold-Add-SuppA-H)
  273.           (FutoMinA101-Bold-Add-SuppB-HV)
  274.           (FutoMinA101-Bold-Add-H)
  275.           (FutoMinA101-Bold-Add-V)
  276.           (FutoMinA101-Bold-EUC-H)
  277.           (FutoMinA101-Bold-EUC-V)
  278.           (FutoMinA101-Bold-Ext-RKSJ-V)
  279.           (FutoMinA101-Bold-Ext-RKSJ-H)
  280.           (FutoMinA101-Bold-Ext-SuppA-H)
  281.           (FutoMinA101-Bold-Ext-SuppA-V)
  282.           (FutoMinA101-Bold-Ext-SuppB-HV)
  283.           (FutoMinA101-Bold-Ext-H)
  284.           (FutoMinA101-Bold-Ext-V)
  285.           (FutoMinA101-Bold-NWP-V)
  286.           (FutoMinA101-Bold-NWP-H)
  287.           (FutoMinA101-Bold-RKSJ-UserGaiji)
  288.           (FutoMinA101-Bold-RKSJ-V)
  289.           (FutoMinA101-Bold-RKSJ-H)
  290.           (FutoMinA101-Bold-SuppA-V)
  291.           (FutoMinA101-Bold-SuppA-H)
  292.           (FutoMinA101-Bold-SuppB-HV)
  293.           (FutoMinA101-Bold-H)
  294.           (FutoMinA101-Bold-V)
  295.           (FutoGoB101-Bold-83pv-RKSJ-H)
  296.           (FutoGoB101-Bold-83pv-SuppA-H)
  297.           (FutoGoB101-Bold-83pv-SuppB-H)
  298.           (FutoGoB101-Bold-Add-RKSJ-V)
  299.           (FutoGoB101-Bold-Add-RKSJ-H)
  300.           (FutoGoB101-Bold-Add-SuppA-V)
  301.           (FutoGoB101-Bold-Add-SuppA-H)
  302.           (FutoGoB101-Bold-Add-SuppB-HV)
  303.           (FutoGoB101-Bold-Add-H)
  304.           (FutoGoB101-Bold-Add-V)
  305.           (FutoGoB101-Bold-EUC-H)
  306.           (FutoGoB101-Bold-EUC-V)
  307.           (FutoGoB101-Bold-Ext-RKSJ-V)
  308.           (FutoGoB101-Bold-Ext-RKSJ-H)
  309.           (FutoGoB101-Bold-Ext-SuppA-V)
  310.           (FutoGoB101-Bold-Ext-SuppA-H)
  311.           (FutoGoB101-Bold-Ext-SuppB-HV)
  312.           (FutoGoB101-Bold-Ext-V)
  313.           (FutoGoB101-Bold-Ext-H)
  314.           (FutoGoB101-Bold-NWP-H)
  315.           (FutoGoB101-Bold-NWP-V)
  316.           (FutoGoB101-Bold-RKSJ-UserGaiji)
  317.           (FutoGoB101-Bold-RKSJ-V)
  318.           (FutoGoB101-Bold-RKSJ-H)
  319.           (FutoGoB101-Bold-SuppA-V)
  320.           (FutoGoB101-Bold-SuppA-H)
  321.           (FutoGoB101-Bold-SuppB-HV)
  322.           (FutoGoB101-Bold-V)
  323.           (FutoGoB101-Bold-H)
  324.           (Jun101-Light-83pv-RKSJ-H)
  325.           (Jun101-Light-83pv-SuppA-H)
  326.           (Jun101-Light-83pv-SuppB-H)
  327.           (Jun101-Light-Add-RKSJ-H)
  328.           (Jun101-Light-Add-RKSJ-V)
  329.           (Jun101-Light-Add-SuppA-H)
  330.           (Jun101-Light-Add-SuppA-V)
  331.           (Jun101-Light-Add-SuppB-HV)
  332.           (Jun101-Light-Add-H)
  333.           (Jun101-Light-Add-V)
  334.           (Jun101-Light-EUC-V)
  335.           (Jun101-Light-EUC-H)
  336.           (Jun101-Light-Ext-RKSJ-V)
  337.           (Jun101-Light-Ext-RKSJ-H)
  338.           (Jun101-Light-Ext-SuppA-H)
  339.           (Jun101-Light-Ext-SuppA-V)
  340.           (Jun101-Light-Ext-SuppB-HV)
  341.           (Jun101-Light-Ext-H)
  342.           (Jun101-Light-Ext-V)
  343.           (Jun101-Light-NWP-V)
  344.           (Jun101-Light-NWP-H)
  345.           (Jun101-Light-RKSJ-UserGaiji)
  346.           (Jun101-Light-RKSJ-H)
  347.           (Jun101-Light-RKSJ-V)
  348.           (Jun101-Light-SuppA-H)
  349.           (Jun101-Light-SuppA-V)
  350.           (Jun101-Light-SuppB-HV)
  351.           (Jun101-Light-H)
  352.           (Jun101-Light-V)
  353.           (PCCenturyOldStyle-Regular)
  354.           (PCHelvetica-Bold)
  355.           (PCHelveticaNeue-Medium)
  356.           (PCJun101-Light) ]
  357.         { 2 index eq or } forall
  358.         { pop } { FontD exch cvn 1 dict dup /FontType 0 put put } ifelse }  
  359.       {dup length 13 add string dup  0 (%disk?%fonts/) putinterval dup 
  360.        13 3 index putinterval {/disk? true def pop pop} =string filenameforall 
  361.        disk? not { FontD exch cvn 1 dict dup /FontType 1 put put } if
  362.       } ifelse
  363.      } ifelse /disk? false def
  364.     } 100 string /Font resourceforall
  365.   } {/FontD FontDirectory def } ifelse 
  366.  
  367. } ifelse
  368. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  369. /FontGroupDict 120 dict dup 3 1 roll def begin
  370.  
  371. % Group 0    -    in the original, classic LW and all subsequent LWs
  372. [
  373.     /Courier 
  374.     /Courier-Bold 
  375.     /Courier-Oblique 
  376.     /Courier-BoldOblique 
  377.     /Helvetica 
  378.     /Helvetica-Bold 
  379.     /Helvetica-Oblique 
  380.     /Helvetica-BoldOblique 
  381.     /Times-Roman 
  382.     /Times-Bold 
  383.     /Times-Italic 
  384.     /Times-BoldItalic 
  385.     /Symbol 
  386. ] {0 def}forall
  387.  
  388. % Group 1    -    in the LW Plus and all subsequent LWs (see also: Group 5)
  389. [
  390.     /AvantGarde-Book 
  391.     /AvantGarde-Demi 
  392.     /AvantGarde-BookOblique 
  393.     /AvantGarde-DemiOblique 
  394.     /Bookman-Light
  395.     /Bookman-Demi 
  396.     /Bookman-LightItalic 
  397.     /Bookman-DemiItalic 
  398.     /NewCenturySchlbk-Roman 
  399.     /NewCenturySchlbk-Bold 
  400.     /NewCenturySchlbk-Italic 
  401.     /NewCenturySchlbk-BoldItalic 
  402.     /Palatino-Roman 
  403.     /Palatino-Bold 
  404.     /Palatino-Italic 
  405.     /Palatino-BoldItalic 
  406.     /ZapfChancery-MediumItalic 
  407. ] {1 def}forall
  408.  
  409. % Group 2     -    in the LW Plus and all subsequent LWs except IIg, IIf
  410. [
  411.     /ZapfDingbats
  412. ] {2 def}forall
  413.  
  414. % Group 3     -    in some LWs for HP PCL emulation
  415. [
  416.     /Emulatorfont
  417. ] {3 def}forall
  418.  
  419. % Group 4     -    in original Personal LW NT only (so far)
  420. [
  421.     /Emulatorfont-Bold
  422. ] {4 def}forall
  423.  
  424. % Group 5     -    separated from Group 1 because of the LW Pro 400/405
  425. [
  426.     /Helvetica-Narrow 
  427.     /Helvetica-Narrow-Bold 
  428.     /Helvetica-Narrow-Oblique 
  429.     /Helvetica-Narrow-BoldOblique 
  430. ] {5 def}forall
  431.  
  432. % Group 6     -    kanji ROM fonts found in the LW Pro 400/405
  433. [
  434.     /GothicBBB-Medium-83pv-RKSJ-H
  435.     /GothicBBB-Medium-83pv-SuppA-H
  436.     /GothicBBB-Medium-83pv-SuppB-H
  437.     /GothicBBB-Medium-Add-H
  438.     /GothicBBB-Medium-Add-RKSJ-H
  439.     /GothicBBB-Medium-Add-RKSJ-V
  440.     /GothicBBB-Medium-Add-SuppA-H
  441.     /GothicBBB-Medium-Add-SuppA-V
  442.     /GothicBBB-Medium-Add-SuppB-HV
  443.     /GothicBBB-Medium-Add-V
  444.     /GothicBBB-Medium-EUC-H
  445.     /GothicBBB-Medium-EUC-V
  446.     /GothicBBB-Medium-Ext-H
  447.     /GothicBBB-Medium-Ext-RKSJ-H
  448.     /GothicBBB-Medium-Ext-RKSJ-V
  449.     /GothicBBB-Medium-Ext-SuppA-H
  450.     /GothicBBB-Medium-Ext-SuppA-V
  451.     /GothicBBB-Medium-Ext-SuppB-HV
  452.     /GothicBBB-Medium-Ext-V
  453.     /GothicBBB-Medium-H
  454.     /GothicBBB-Medium-NWP-H
  455.     /GothicBBB-Medium-NWP-V
  456.     /GothicBBB-Medium-RKSJ-H
  457.     /GothicBBB-Medium-RKSJ-UserGaiji
  458.     /GothicBBB-Medium-RKSJ-V
  459.     /GothicBBB-Medium-SuppA-H
  460.     /GothicBBB-Medium-SuppA-V
  461.     /GothicBBB-Medium-SuppB-HV
  462.     /GothicBBB-Medium-V
  463.     /Mincho-PC-Hiragana
  464.     /Mincho-PC-Katakana
  465.     /PCHelvetica
  466.     /PCTimes-Roman
  467.     /Ryumin-Light-83pv-RKSJ-H
  468.     /Ryumin-Light-83pv-SuppA-H
  469.     /Ryumin-Light-83pv-SuppB-H
  470.     /Ryumin-Light-Add-H
  471.     /Ryumin-Light-Add-RKSJ-H
  472.     /Ryumin-Light-Add-RKSJ-V
  473.     /Ryumin-Light-Add-SuppA-H
  474.     /Ryumin-Light-Add-SuppA-V
  475.     /Ryumin-Light-Add-SuppB-HV
  476.     /Ryumin-Light-Add-V
  477.     /Ryumin-Light-EUC-H
  478.     /Ryumin-Light-EUC-V
  479.     /Ryumin-Light-Ext-H
  480.     /Ryumin-Light-Ext-RKSJ-H
  481.     /Ryumin-Light-Ext-RKSJ-V
  482.     /Ryumin-Light-Ext-SuppA-H
  483.     /Ryumin-Light-Ext-SuppA-V
  484.     /Ryumin-Light-Ext-SuppB-HV
  485.     /Ryumin-Light-Ext-V
  486.     /Ryumin-Light-H
  487.     /Ryumin-Light-NWP-H
  488.     /Ryumin-Light-NWP-V
  489.     /Ryumin-Light-RKSJ-H
  490.     /Ryumin-Light-RKSJ-UserGaiji
  491.     /Ryumin-Light-RKSJ-V
  492.     /Ryumin-Light-SuppA-H
  493.     /Ryumin-Light-SuppA-V
  494.     /Ryumin-Light-SuppB-HV
  495.     /Ryumin-Light-V
  496. ] {6 def} forall
  497.  
  498. % Group 7     -    For Color LaserWriter 12/600 PS
  499. [
  500.     /Helvetica-Condensed 
  501.     /Helvetica-Condensed-Bold 
  502.     /Helvetica-Condensed-Oblique 
  503.     /Helvetica-Condensed-BoldObl
  504.  
  505. ] {7 def}forall
  506.  
  507. end
  508.  
  509. /ProductVersionDict 120 dict dup 3 1 roll def begin
  510.  
  511.  /LaserWriter_23.0                      (10000000)  def     % Group  0.            Total: 13 fonts in ROM
  512.  
  513.  /LaserWriter_Plus_38.0                  (11100100)  def     % Groups 0,1,2,5.        Total: 35 fonts in ROM
  514.  /LaserWriter_Plus_42.2                  (11100100)  def     % Groups 0,1,2,5.        Total: 35 fonts in ROM
  515.  
  516.  /LaserWriter_II_NT_47.0              (11100100)  def     % Groups 0,1,2,5.        Total: 35 fonts in ROM
  517.  /LaserWriter_II_NTX_47.0              (11100100)  def     % Groups 0,1,2,5.        Total: 35 fonts in ROM
  518.  /LaserWriter_II_NTX_50.5              (11100100)  def     % Groups 0,1,2,5.        Total: 35 fonts in ROM
  519.  /LaserWriter_II_NTX_51.8              (11100100)  def     % Groups 0,1,2,5.        Total: 35 fonts in ROM
  520.  
  521.  /LaserWriter_Personal_NT_51.8          (11111100)  def     % Groups 0,1,2,3,4,5. Total: 37 fonts in ROM
  522.  /LaserWriter_Personal_NTR_2010.129      (11100100)  def     % Groups 0,1,2,5.        Total: 35 fonts in ROM
  523.  /LaserWriter_Personal_320_2013.112      (11100100)  def     % Groups 0,1,2,5.        Total: 35 fonts in ROM
  524.  /LaserWriter_4_600_PS_2014.107            (11100100)  def     % Groups 0,1,2,5.        Total: 35 fonts in ROM
  525.  
  526.  /LaserWriter_IIf_2010.113              (11010100)  def     % Groups 0,1,3,5.        Total: 35 fonts in ROM
  527.  /LaserWriter_IIg_2010.111              (11010100)  def     % Groups 0,1,3,5.        Total: 35 fonts in ROM
  528.  /LaserWriter_IIg_2010.113              (11010100)  def     % Groups 0,1,3,5.        Total: 35 fonts in ROM
  529.  /LaserWriter_IIg_2010.130              (11110100)  def     % Groups 0,1,2,3,5.   Total: 36 fonts in ROM
  530.  
  531.  /PC-PR3000PS_4_2011.110              (10000110)  def     % Groups 0,5,6.       Total: 79 fonts in ROM
  532.  /PC-PR3000PS_4F_2011.110             (10000110)  def     % Groups 0,5,6.       Total: 79 fonts in ROM
  533.  
  534.  /LaserWriter_Pro_600_2010.130          (11110100)  def     % Groups 0,1,2,3,5.   Total: 36 fonts in ROM
  535.  /LaserWriter_Pro_630_2010.130          (11110100)  def     % Groups 0,1,2,3,5.   Total: 36 fonts in ROM
  536.  
  537.  /LaserWriter_Select_360_2013.112      (11100100)  def     % Groups 0,1,2,5.       Total: 35 fonts in ROM
  538.  /LaserWriter_Select_360f_2013.112      (11100100)  def     % Groups 0,1,2,5.       Total: 35 fonts in ROM
  539.  /LaserWriter_Select_610_2013.112      (11100100)  def     % Groups 0,1,2,5.       Total: 35 fonts in ROM
  540.  
  541.  /LaserWriter_Pro_810_2011.113          (11110100)  def     % Groups 0,1,2,3,5.   Total: 36 fonts in ROM
  542.  /LaserWriter_Pro_810f_2011.113          (11110100)  def     % Groups 0,1,2,3,5.   Total: 36 fonts in ROM
  543.  
  544.  /LaserWriter_16_600_PS_2014.106      (11100100)  def     % Groups 0,1,2,5.       Total: 35 fonts in ROM
  545.  /LaserWriter_16_600_PS_Fax_2014.106  (11100100)  def     % Groups 0,1,2,5.       Total: 35 fonts in ROM
  546.  /LaserWriter_16_600_PS-J_2014.106    (11100100)  def     % Groups 0,1,2,5.       Total: 35 fonts in ROM
  547.  
  548.  /LaserWriter_12_640_PS_2015.105      (11100100)  def     % Groups 0,1,2,5.       Total: 35 fonts in ROM
  549.  /LaserWriter_12_640_PS_Fax_2015.105  (11100100)  def     % Groups 0,1,2,5.       Total: 35 fonts in ROM
  550.  /LaserWriter_12_640_PS-J_2015.105    (11100100)  def     % Groups 0,1,2,5.       Total: 35 fonts in ROM
  551.  
  552.  /Color_LaserWriter_12_600_PS_2014.108 (11100101)  def     % Groups 0,1,2,5,7       Total: 39 fonts in ROM
  553.  /Color_LaserWriter_12_600_PS-J_2014.108 (11100101)  def     % Groups 0,1,2,5,7       Total: 39 fonts in ROM
  554.  /Color_LaserWriter_12_660_PS_2014.108 (11100101)  def     % Groups 0,1,2,5,7       Total: 39 fonts in ROM
  555.  
  556. end
  557.                   
  558. /IsKnownROMFont {                                % assume it's an Apple printer (not 3rd party)
  559.     FontGroupDict exch 2 copy known 
  560.     { get ProductVersionDict myProduct 
  561.       cvn 2 copy known                            % izzit a known model?
  562.       { get } { pop pop (11100100) } ifelse         % if not, assume 35 standard fonts
  563.       exch get (1) 0 get eq
  564.     } { pop pop false } ifelse
  565. } def
  566.  
  567. ListFonts
  568.